package com.example.starseas_phone.Adapters;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.example.starseas_phone.Entity.AllClass;
import com.example.starseas_phone.Entity.College;
import com.example.starseas_phone.R;

import java.util.List;

public class ClassmanageAdapter extends ArrayAdapter<AllClass> {

    private int id;

    public ClassmanageAdapter(@NonNull Context context, int resource, @NonNull List<AllClass> objects) {
        super(context, resource, objects);
        id = resource;
    }

    @NonNull
    @Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
        AllClass allClass = getItem(position);
        View view = LayoutInflater.from(parent.getContext()).inflate(id,parent,false);
        TextView collegemanage_listview_collegename = view.findViewById(R.id.collegemanage_listview_collegename);
        collegemanage_listview_collegename.setText(allClass.getClassId());
        return view;
    }
}
